class afs::service inherits afs {

case $operatingsystem {
/centos|CentOS|AlmaLinux|almalinux/: {
  $afs_service="openafs-client"
  } #end centos
/scientific|Scientific/: {
  $afs_service="afs"
  }
}

  service {"$afs_service":
    ensure     => running,
    name       => $afs_service,
    hasstatus  => false,    # not on SLC6 init script, unreliable on CC7 systemd
    pattern    => ' \[afsd\]$', # cache manager kernel thread, shows as '[afsd]' in "ps -ef"
    hasrestart => false,    # generally a very bad idea
    stop       => '/bin/false',
    enable     => true,
  }
}
